import request from '@/utils/request'

// 查询报价单列表
export function listQuoteInfo(query) {
  return request({
    url: '/quote/quoteInfo/list',
    method: 'get',
    params: query
  })
}

// 查询报价单详细
export function getQuoteInfo(id) {
  return request({
    url: '/quote/quoteInfo/' + id,
    method: 'get'
  })
}

// 新增报价单
export function addQuoteInfo(data) {
  return request({
    url: '/quote/quoteInfo',
    method: 'post',
    data: data
  })
}

// 修改报价单
export function updateQuoteInfo(data) {
  return request({
    url: '/quote/quoteInfo',
    method: 'put',
    data: data
  })
}

// 删除报价单
export function delQuoteInfo(id) {
  return request({
    url: '/quote/quoteInfo/' + id,
    method: 'delete'
  })
}

export function auditQuoteInfo(data) {
  return request({
    url: '/quote/quoteInfo/audit',
    method: 'put',
    data: data
  })
}

export function listCode(keyword) {
  return request({
    url: '/quote/quoteInfo/listCode',
    method: 'get',
    params: {
      keyword: keyword
    }
  })
}

export function getQuoteInfoByCode(code) {
  return request({
    url: '/quote/quoteInfo/code/' + code,
    method: 'get'
  })
}
